package com.allqj.sfx.infrastructure.converter;

import com.allqj.sfx.domain.entity.SystemResource;
import com.allqj.sfx.infrastructure.dao.SystemResourceDAO;
import com.allqj.sfx.infrastructure.po.SystemResourceDO;
import org.springframework.beans.BeanUtils;

/**
 * @author sjw
 * @className SystemResourceConverter
 * @date 2022/7/28 11:25
 * @description: 转换器
 */
public class SystemResourceConverter implements DataConverter<SystemResource, SystemResourceDO, SystemResourceDAO> {

    // 转换器实例
    public static SystemResourceConverter INSTANCE = new SystemResourceConverter();

    @Override
    public SystemResource do2Entity(SystemResourceDO systemResourceDO) {
        if (systemResourceDO == null)
            return null;
        SystemResource systemResource = new SystemResource();
        BeanUtils.copyProperties(systemResourceDO, systemResource);
        return systemResource;
    }

    @Override
    public SystemResourceDO entity2Do(SystemResource systemResource) {
        return null;
    }

    @Override
    public SystemResourceDO entity2Do(SystemResource systemResource, SystemResourceDAO systemResourceDAO) {
        return null;
    }
}
